package com.ygy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName evaluation
 */
@TableName(value ="evaluation")
@Data
public class Evaluation implements Serializable {
    /**
     * 
     */
    @TableId(value = "evaluation_id",type = IdType.AUTO)

    private Integer evaluationId;

    /**
     * 是评价人的买家ID
     */
    @TableField(value = "buyer_id")
    private Integer buyerId;

    /**
     * sellerId是被评价的卖家ID
     */
    @TableField(value = "seller_id")
    private Integer sellerId;

    /**
     * orderId是关联订单ID
     */
    @TableField(value = "order_id")
    private Integer orderId;

    /**
     * receiverId是评论接收者Id
     */
    @TableField(value = "receiver_id")
    private Integer receiverId;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    /**
     * 
     */
    @TableField(value = "content")
    private String content;

    /**
     * 评价的内容
     */
    @TableField(value = "score")
    private Double score;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}